<template>
	<view>
		<mySwiper :list="list" ref="mySwiper">
			<view slot="tab1">

				<u-cell-group class="bg_white">
					<u-cell title="项目名称" :value="''"></u-cell>
					<u-cell title="项目编码" :value="''"></u-cell>
				</u-cell-group>

				<myFlowOpinion v-if="flowDataObj.showFlowOpinion" :Run_ID="flowDataObj.Run_ID">
				</myFlowOpinion>
			</view>

			<view slot="tab2">
				<myFileUpload :bdbm="getPageData.Key" :typeid="file1.typeid" :readonly="file1.readonly">
				</myFileUpload>
			</view>

			<myFlowButton ref="flowBtn" v-if="flowDataObj.showFlowButton" :flowDataObj="flowDataObj" @loading="loading"
				@beforePopup="beforePopup" @beforeSubmit="beforeSubmit" @afterSubmit="afterSubmit"
				@afterOver="afterOver" slot="flowButton">
			</myFlowButton>
		</mySwiper>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
					name: '基本信息',
					show: true,
					slot: "tab1"
				}, {
					name: '附件',
					show: true,
					slot: "tab2"
				}, {
					name: 'tab3',
					show: false,
					slot: "tab3"
				}],
				getPageData: {},
				formdata: {},
				flowDataObj: {
					FlowCode: "", //流程编码
					TableName: "", //流程对应表
					BDBM: "", //表单编码主键
					Business_Key: "",
					Step_ID: "", //步骤ID
					Run_ID: "", //RunID
					Step_Handler_ID: "",
					Step_BusinessCode: "",
					FormData: "", //流程json数据
					GUID: "", //GUID 记录主键？
					Action: "edit", //流程按钮状态
					AddBtns: [], //自定义按钮
					showFlowOpinion: false, //处理进度加载状态
					showFlowButton: false //流程按钮加载状态
				},
				file1: {
					typeid: "",
					readonly: true,
				},
			};
		},
		onLoad() {
			this.getPageData = this.$gl.getStorage();
		},
		onShow() {},
		onReady() {
			this.getData(this.getPageData);
		},
		methods: {
			getData(data) {

				// this.$api.myAjaxFunc(API.GeneralGroupApply.GetGeneralGroupApplyInfo, {
				// 	Key: data.Key,
				// 	Step_Handler_ID: data.Step_Handler_ID
				// }).then(res => {

				// 	this.formdata = {
				// 		...res.resultData,
				// 		...this.getPageData
				// 	}
				// 	//组装流程数据
				// 	this.flowDataObj = this.$gl.assembleData(this.flowDataObj, this.formdata, res.resultData);
				// })

			},
			//流程按钮加载完成后
			loading(e) {

			},
			//流程弹窗弹出之前
			beforePopup(param, resolve, reject) {
				resolve();
			},
			//流程提交之前
			beforeSubmit(param, resolve, reject) {
				resolve();
			},
			//流程提交之后
			afterSubmit(param, resolve, reject) {
				resolve();
			},
			//流程办结之后
			afterOver(param, resolve, reject) {
				resolve();
			}
		}
	};
</script>

<style lang="scss" scoped>
</style>
